﻿//生成[UpFile]Service代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FineAdmin.IService;
using FineAdmin.Model;
using FineAdmin.IRepository;
using FineAdmin.Common;

namespace FineAdmin.Service
{
    public class UpFileService : BaseService<UpFileModel>, IUpFileService
    {
        public IUpFileRepository UpFileRepository { get; set; }
        public IEnumerable<UpFileModel> GetUpFileList()
        {
            return UpFileRepository.GetUpFileList();
        }


        public dynamic GetListByFilter(UpFileModel filter, PageInfo pageInfo)
        {
            string _where = " where 1=1";
            if (!string.IsNullOrWhiteSpace(filter.FileName)) {
                _where += string.Format(" and  FileName like '%{0}%' ", filter.FileName);
            }
            return GetListByFilter(filter, pageInfo, _where);
        }

    }

}